package com.tech.pattern.factory.simplefactory.operation;

public class OperationTest {
    public static void main(String[] args) {
        OperationFactory factory = new OperationFactory();
        // 加法
        Operation operation;
        operation = factory.operation("+");
        System.out.println(operation.getResult(1, 2));
        
        // 减法
        operation = factory.operation("-");
        System.out.println(operation.getResult(1, 2));
    }

}
